<template>
<h3>Main</h3>
<p>搜索内容是:{{ search }}</p>
<SearchComponent @searchEvent="getsearch"/>
</template>

<script>
import SearchComponent from './SearchComponent.vue';

export default{
    data(){
        return{
            search:""
        }
    },
    components:{
        SearchComponent
    },
    methods:{
        getsearch(data){
            this.search = data
        }
    }
}

</script>